package Aop.Object;

import Aop.Element.Vector;
import android.graphics.Bitmap;

public class DrawObject
{
	public Bitmap image[];
	public double positionX;
	public double positionY;
	public double rotation;
	public double scaleX;
	public double scaleY;
	public boolean flip;
	public byte drawImageLimit;
	public byte drawImageNumber;	
	
	public void Create(Bitmap[] _image, int _drawImageLimit, Vector _position, double _rotation, double _scaleX, double _scaleY, boolean _flip)
	{
		image = _image;
		positionX = _position.GetX();
		positionY = _position.GetY();
		rotation = _rotation;
		scaleX = _scaleX;
		scaleY = _scaleY;
		flip = _flip;
		drawImageLimit = (byte)_drawImageLimit;
		drawImageNumber = 0;
	}
	public void SetImage(Bitmap[] _image){image = _image;}
	public void SetPosition(Vector _position){positionX = _position.GetX(); positionY = _position.GetY();}
	public void SetRotation (double _rotation) {rotation = _rotation;}
	public void SetScale (double _scaleX, double _scaleY) {scaleX = _scaleX; scaleY = _scaleY;}
	public void SetFlip (boolean _flip) {flip = _flip;}
	public void SetImageNumber (int _drawImageNumber) {drawImageNumber = (byte)_drawImageNumber;}
	public void ImageNumberPlus() {drawImageNumber++; if(drawImageNumber > drawImageLimit - 1) drawImageNumber = 0;}
	public void ImageNumberMinus() {drawImageNumber--; if(drawImageNumber < 0) drawImageNumber = (byte)(drawImageLimit - 1);}
	public void MovePosition(Vector _position){positionX += _position.GetX(); positionY += _position.GetY();}
	
}
